package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2024-12-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_stock_check")
@NoArgsConstructor
public class StockCheckDo extends Model<StockCheckDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("order_no")
    private String orderNo;

    /**
     * 状态 10待盘点 20盘点中 30已盘点 40已作废
     */
    @TableField("status")
    private Integer status;

    /**
     * 库存类型 默认0 产品库存
     */
    @TableField("stock_type")
    private Integer stockType;

    /**
     * 盘点类型 1库位盘点 2 sku+库位盘点
     */
    @TableField("check_type")
    private Integer checkType;

    @TableField("tips")
    private String tips;

    @TableField("wh_id")
    private Long whId;

    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    private Long tenantId;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private Long createBy;

    @TableField(value = "update_time", fill =  FieldFill.UPDATE)
    private Date updateTime;

    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    private Long updateBy;

    @TableField("start_time")
    private Date startTime;

    @TableField("start_by")
    private Long startBy;

    @TableField("finish_time")
    private Date finishTime;

    @TableField("finish_by")
    private Long finishBy;
    @TableField("abort_time")
    private Date abortTime;

    @TableField("abort_by")
    private Long abortBy;

    public StockCheckDo(Integer stockType, Integer checkType, String tips) {
        this.stockType = stockType;
        this.checkType = checkType;
        this.tips = tips;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
